# from pathlib import Path
# import sys
# import os
#
# # 配置
# # 小目录
# BASE_DIR = Path(__file__).resolve().parent.parent
# # 将apps目录放入环境遍历  # 以供app间模块互通
# sys.path.insert(0, os.path.join(BASE_DIR, 'pural_django', 'apps'))
# # 将小目录也放到环境变量中，以供各个文件夹间互通
# sys.path.insert(0, str(BASE_DIR))
# # 由于项目根路径原本就在环境变量中，所以不需要另外添加了
#
# SECRET_KEY = 'django-insecure-lpkwzv=-vq950bvxbr1rf$n=qka^+lf4p(+9_k=0(wkka9wh(c'
# DEBUG = True
# ALLOWED_HOSTS = []
#
# INSTALLED_APPS = [
#     'django.contrib.staticfiles',
#     # 注册drf
#     'rest_framework',
#     # 注册自定义的app
#     'user'
# ]
#
# MIDDLEWARE = [
#     # 注册自定义中间件
#     'middle_wares.common_middleware.CommonMiddleWare'
# ]
#
# ROOT_URLCONF = 'pural_django.urls'
#
# TEMPLATES = [
#     {
#         'BACKEND': 'django.template.backends.django.DjangoTemplates',
#         'DIRS': [BASE_DIR / 'templates']
#         ,
#         'APP_DIRS': True,
#         'OPTIONS': {
#             'context_processors': [
#                 'django.template.context_processors.debug',
#                 'django.template.context_processors.request',
#                 'django.contrib.auth.context_processors.auth',
#                 'django.contrib.messages.context_processors.messages',
#             ],
#         },
#     },
# ]
#
# WSGI_APPLICATION = 'pural_django.wsgi.application'
#
# DATABASES = {
#     'default': {
#         'ENGINE': 'django.db.backends.sqlite3',
#         'NAME': BASE_DIR / 'db.sqlite3',
#     }
# }
#
# AUTH_PASSWORD_VALIDATORS = [
#     {
#         'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
#     },
#     {
#         'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
#     },
#     {
#         'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
#     },
#     {
#         'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
#     },
# ]
#
# LANGUAGE_CODE = 'zh-hans'
#
# TIME_ZONE = 'Asia/Shanghai'
#
# USE_I18N = True
#
# USE_TZ = False
#
# # 静态文件
# STATIC_URL = 'static/'
#
# # media 文件目录
# MEDIA_URL = '/media/'
# MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
#
# DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
#
# # DRF配置
# REST_FRAMEWORK = {
#     "UNAUTHENTICATED_USER": None,
# }
